package com.cyp.blogsystem.pojo;

import com.cyp.blogsystem.model.vo.ArticleVO;
import lombok.Data;
import java.util.List;

@Data
public class PageResult<T> {
    /**
     * 总记录数
     */
    private long total;

    /**
     * 数据列表
     */
    private List<T> list;

    public static <T> PageResult<T> of(long total, List<T> list) {
        PageResult<T> result = new PageResult<>();
        result.setTotal(total);
        result.setList(list);
        return result;
    }

    /**
     * 返回空指针
     * @return
     * @param <T>
     */
    public static <T> PageResult<T> empty() {
        return null;
    }
}